﻿/*
Post-Deployment Script Template							
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be appended to the build script.		
 Use SQLCMD syntax to include a file in the post-deployment script.			
 Example:      :r .\myfile.sql								
 Use SQLCMD syntax to reference a variable in the post-deployment script.		
 Example:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/
grant execute on aspnet_PersonalizationAdministration_ResetUserState to public
go

grant execute on aspnet_PersonalizationAdministration_FindState to public
go

grant execute on aspnet_PersonalizationAdministration_GetCountOfState to public
go

grant execute on aspnet_WebEvent_LogEvent to public
go

grant execute on aspnet_Setup_RestorePermissions to public
go

grant execute on aspnet_Setup_RemoveAllRoleMembers to public
go

grant execute on aspnet_RegisterSchemaVersion to public
go

grant execute on aspnet_CheckSchemaVersion to public
go

grant execute on aspnet_Applications_CreateApplication to public
go

grant execute on aspnet_UnRegisterSchemaVersion to public
go

grant execute on aspnet_Users_CreateUser to public
go

grant execute on aspnet_Users_DeleteUser to public
go

grant execute on aspnet_AnyDataInTables to public
go

grant execute on aspnet_Membership_CreateUser to public
go

grant execute on aspnet_Membership_GetUserByName to public
go

grant execute on aspnet_Membership_GetUserByUserId to public
go

grant execute on aspnet_Membership_GetUserByEmail to public
go

grant execute on aspnet_Membership_GetPasswordWithFormat to public
go

grant execute on aspnet_Membership_UpdateUserInfo to public
go

grant execute on aspnet_Membership_GetPassword to public
go

grant execute on aspnet_Membership_SetPassword to public
go

grant execute on aspnet_Membership_ResetPassword to public
go

grant execute on aspnet_Membership_UnlockUser to public
go

grant execute on aspnet_Membership_UpdateUser to public
go

grant execute on aspnet_Membership_ChangePasswordQuestionAndAnswer to public
go

grant execute on aspnet_Membership_GetAllUsers to public
go

grant execute on aspnet_Membership_GetNumberOfUsersOnline to public
go

grant execute on aspnet_Membership_FindUsersByName to public
go

grant execute on aspnet_Membership_FindUsersByEmail to public
go

grant execute on aspnet_UsersInRoles_IsUserInRole to public
go

grant execute on aspnet_UsersInRoles_GetRolesForUser to public
go

grant execute on aspnet_Roles_CreateRole to public
go

grant execute on aspnet_Roles_DeleteRole to public
go

grant execute on aspnet_Roles_RoleExists to public
go

grant execute on aspnet_UsersInRoles_AddUsersToRoles to public
go

grant execute on aspnet_UsersInRoles_RemoveUsersFromRoles to public
go

grant execute on aspnet_UsersInRoles_GetUsersInRoles to public
go

grant execute on aspnet_UsersInRoles_FindUsersInRole to public
go

grant execute on aspnet_Roles_GetAllRoles to public
go

grant execute on aspnet_Personalization_GetApplicationId to public
go

grant execute on aspnet_Paths_CreatePath to public
go

grant execute on aspnet_PersonalizationAllUsers_GetPageSettings to public
go

grant execute on aspnet_PersonalizationAllUsers_ResetPageSettings to public
go

grant execute on aspnet_PersonalizationAllUsers_SetPageSettings to public
go

grant execute on aspnet_PersonalizationPerUser_GetPageSettings to public
go

grant execute on aspnet_PersonalizationPerUser_ResetPageSettings to public
go

grant execute on aspnet_PersonalizationPerUser_SetPageSettings to public
go

grant execute on aspnet_PersonalizationAdministration_DeleteAllState to public
go

grant execute on aspnet_PersonalizationAdministration_ResetSharedState to public
go

grant execute on aspnet_Profile_GetProperties to public
go

grant execute on aspnet_Profile_SetProperties to public
go

grant execute on aspnet_Profile_DeleteProfiles to public
go

grant execute on aspnet_Profile_DeleteInactiveProfiles to public
go

grant execute on aspnet_Profile_GetNumberOfInactiveProfiles to public
go

grant execute on aspnet_Profile_GetProfiles to public
go

grant execute on proc_cm_GetContentByContentCode to public
go

grant execute on proc_cm_GetHtmlPageByUrl to public
go

grant execute on proc_cm_ListContentByHtmlPageId to public
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'Administrator'
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'HtmlEditor'
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'RegisteredMember'
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'AuthenticatedUser'
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'SystemAdministrator'
go

declare @CurrentTimeUtc datetime
set @CurrentTimeUtc = GETUTCDATE()
exec [dbo].[aspnet_UsersInRoles_AddUsersToRoles] @ApplicationName = 'ALLNATIONS',@UserNames = 'patrick',@RoleNames = 'Administrator',@CurrentTimeUtc = @CurrentTimeUtc;
exec [dbo].[aspnet_UsersInRoles_AddUsersToRoles] @ApplicationName = 'ALLNATIONS',@UserNames = 'patrick',@RoleNames = 'HtmlEditor',@CurrentTimeUtc = @CurrentTimeUtc;
exec [dbo].[aspnet_UsersInRoles_AddUsersToRoles] @ApplicationName = 'ALLNATIONS',@UserNames = 'patrick',@RoleNames = 'RegisteredMember',@CurrentTimeUtc = @CurrentTimeUtc;
exec [dbo].[aspnet_UsersInRoles_AddUsersToRoles] @ApplicationName = 'ALLNATIONS',@UserNames = 'patrick',@RoleNames = 'AuthenticatedUser',@CurrentTimeUtc = @CurrentTimeUtc;
exec [dbo].[aspnet_UsersInRoles_AddUsersToRoles] @ApplicationName = 'ALLNATIONS',@UserNames = 'patrick',@RoleNames = 'SystemAdministrator',@CurrentTimeUtc = @CurrentTimeUtc;
go

grant execute on proc_cm_GetContentByCode to public
go

grant execute on proc_cm_DeleteDatabaseContentByCd to public
go

grant execute on proc_cm_GetHtmlPageByUrlById to public
go

grant execute on proc_cm_SaveDatabaseContent to public
go

grant execute on proc_cm_GetPhotoalbum to public
go

grant execute on proc_cm_ListPhotoalbum to public
go

grant execute on proc_cm_SavePhotoalbum to public
go

grant execute on proc_cm_SavePhoto to public
go

grant execute on proc_cm_GetPhoto to public
go

grant execute on proc_cm_ListPhoto to public
go

grant execute on proc_cm_ListSiteMapNode to public
go

grant execute on proc_cm_AddSiteMapNode to public
go

grant execute on proc_cm_SaveSiteNodeTitle to public
go

grant execute on proc_cm_GetSiteMapNode to public
go

grant execute on proc_cm_SaveSiteMapNode to public
go

grant execute on proc_cm_DeleteSiteMapNode to public
go

grant execute on proc_cm_SwapSiteNodeDisplayOrder to public
go

grant execute on proc_cm_MoveDownDatabaseContentByCd to public
go

grant execute on proc_cm_MoveUpDatabaseContentByCd to public
go

grant execute on proc_cm_DeletePhoto to public
go

grant execute on proc_cm_ListEvent to public
go

grant execute on proc_cm_DeleteEvent to public
go

grant execute on proc_cm_SaveEvent to public
go

grant execute on proc_cm_SaveFileshare to public
go

grant execute on proc_cm_ListFileshare to public
go

grant execute on proc_cm_GetFileshare to public
go

grant execute on proc_cm_DeleteFileshare to public
go

grant execute on proc_cm_ListAnnouncement to public
go

grant execute on proc_cm_SaveAnnouncement to public
go

grant execute on proc_cm_DeleteAnnouncement to public
go

grant execute on proc_cm_ListBlogEntry to public
go

grant execute on proc_cm_SaveHtmlPage to public
go

grant execute on proc_cm_SaveBlogEntry to public
go

grant execute on proc_cm_GetBlogEntry to public
go

grant execute on proc_cm_DeleteBlogEntry to public
go

grant execute on proc_cm_SaveShoutout to public
go

grant execute on proc_cm_ListShotuout to public
go

grant execute on proc_cm_ListLatestAnnouncement to public
go

grant execute on proc_cm_ListLatestPhotoalbums to public
go

grant execute on proc_cm_ListRootMenu to public
go

grant execute on proc_cm_GetMemberProfile to public
go

grant execute on proc_cm_ListDailyWord to public
go

grant execute on proc_cm_SaveDailyWord to public
go

grant execute on proc_cm_GetDailyWord to public
go

grant execute on proc_cm_DeleteDailyWord to public
go

grant execute on proc_cm_AddDailyWordQuestion to public
go

grant execute on proc_cm_ListDailyWordQuestion to public
go

grant execute on proc_cm_ListPreviousDailyWord to public
go

grant execute on proc_cm_GetCurrentDailyWord to public
go

grant execute on proc_cm_DeleteDailywordQuestion to public
go

grant execute on proc_cm_GetDailyWordStatus to public
go

grant execute on proc_cm_ListDailywordAnwer to public
go

grant execute on proc_cm_SaveDailywordAnswer to public
go

grant execute on proc_cm_SaveDailyWordStatus to public
go

grant execute on proc_cm_ListSermonSeries to public
go

grant execute on proc_cm_SaveSermonSeries to public
go

grant execute on proc_cm_SaveSermon to public
go

grant execute on proc_cm_GetSermonSeriesByName to public
go

grant execute on proc_cm_ListSermon to public
go

grant execute on proc_cm_GetSermon to public
go

grant execute on proc_cm_ListRotatingBanner to public
go

grant execute on proc_cm_SaveRotatingBanner to public
go

grant execute on proc_cm_DeleteRotatingBanner to public
go

grant execute on proc_cm_GetRotatingBanner to public
go

grant execute on proc_cm_ListActiveSermonSeries to public
go

grant execute on proc_cm_SaveMember to public
go

grant execute on proc_cm_GetMemberByConfirmationGuid to public
go

grant execute on proc_cm_ListSmallGroup to public
go

grant execute on proc_cm_SaveSmallGroup to public
go

grant execute on proc_cm_DeleteSmallGroup to public
go

grant execute on proc_cm_ListMember to public
go

grant execute on proc_cm_SaveMemberToSmallGroup to public
go

grant execute on proc_export_ListMember to public
go

grant execute on proc_cm_MoveUpRotatingBanner to public
go

grant execute on proc_cm_MoveDownRotatingBanner to public
go

grant execute on proc_cm_DeleteSermon to public
go

exec [dbo].[aspnet_Roles_CreateRole] @ApplicationName = 'ALLNATIONS', @RoleName = 'HomepageImageManager'
go
